﻿Imports System.Data
Imports System.Data.Odbc

Module dataLogin
    Private resultado As Boolean
    Public Function identificacion(ByVal user As String, ByVal pass As String) As Boolean

   
        conectar()
        cmd = New OdbcCommand("SELECT * FROM  tlogin WHERE RUT = '" + user + "' AND clave ='" + pass + "'", con)
        dr = cmd.ExecuteReader
        'executing the command and assigning it to connection 
        If dr.Read Then
            'captura de id de usuario logueado
            usuarioID = dr.Item(0)
            resultado = True
        Else
            resultado = False
        End If


        dr.Close()
        Return resultado
    End Function

End Module
